package
{
	import PaperMan.PaperManComponent;
	
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import flash.net.URLRequest;
	import flash.system.ApplicationDomain;
	import flash.system.LoaderContext;
	
	public class PaperManTest extends Sprite
	{
		public function PaperManTest()
		{
			this.stage.align=StageAlign.TOP;
			this.stage.scaleMode=StageScaleMode.NO_SCALE;
			var loader:Loader=new Loader();
			var request:URLRequest=new URLRequest("PaperMan.swf");
			var lc:LoaderContext=new LoaderContext(false,ApplicationDomain.currentDomain);
			loader.load(request,lc);
			loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadOverHandler);
		}
		
		private function loadOverHandler(e:Event):void
		{
			//trace(ApplicationDomain.currentDomain.hasDefinition("defaultMotion"));
			var testPaperMan:PaperManComponent=new PaperManComponent();
			testPaperMan.motionName="defaultMotion";
			testPaperMan.part0Str="TestChange2";
			testPaperMan.part0Str="default";
			testPaperMan.play();
			this.addChild(testPaperMan);
		}
	}
}